home *** CD-ROM | disk | FTP | other *** search
- ; ===================================
- ;
- ; OnGo installer script
- ; $VER: OnGo-Install 2.5 (28.8.96)
- ;
- ; Copyright © 1996 Tak Tang
- ;
- ; ===================================
-
- ; ==== English strings
-
- (set #bad-kick-msg "OnGo requires AmigaOS 2.04 or above.")
-
- (set #hello-msg
- (cat "\n\nThank you for trying OnGo, a cool StartButton and Virtual"
- " Screen manager for the Amiga.\n\nNothing will be deleted from"
- " your system with this installation program.\n\nIf you don't"
- " understand any part of the installation, click on the \"Help\" "
- "gadget found throughout the installation for more information."
- "\n\nCLICK TO PROCEED"))
-
- (set #alltime-msg
- (cat "\n\nDo you want OnGo to be run every "
- "time you turn on your machine?"))
-
- (set #alltime-help
- (cat "\n\nSelecting YES will copy OnGo to your WBStartUp drawer, where"
- " it will be started every time you boot your machine. Selecting"
- " NO will copy OnGo to your SYS:Tools/Commodities drawer."))
-
- (set #choosetool-msg
- (cat "Where shall I copy OnGo (the main program)?"))
-
- (set #choosetool-help
- (cat "\nIf you want OnGo to start automatically each time you reboot,"
- " place OnGo in SYS:WBStartUp.\n\nOtherwise, select the directory"
- " where you store all your commodities.\n\nThis is usually"
- " SYS:Tools/Commodities."))
-
- (set #chooseprefs-msg
- (cat "Which Configuration should I install?"))
-
- (set #chooseprefs-help
- (cat "\nThe Magic setup contains a menu for all the programs contained"
- " in the AmigaMagic pack.\n\nThe Win95 setup contains a Win95 like"
- " menu with many programs from the AmigaMagic pack, and many"
- " commercial, shareware and PD programs."))
-
- (set #chooseicon-msg
- (cat "Which set of icons should I install?"))
-
- (set #chooseicon-help
- (cat "\nIt doesnt make any difference, I'm not much of an artist. If"
- " you have some of your own (MWB, NI etc...) they would be "
- "gratefully received."))
-
- (set #chooselook-msg
- (cat "Choose style of menu."))
-
- (set #chooselook-help
- (cat "\nThe default look is 3DLOOK, which draws menus as a raised bevel"
- " box.\n\nNEWLOOK produces menus similar to the standard workbench "
- "menus - black on white, or whatever you have set them to.\n\nXLOOK"
- " is like 3DLOOK, but recesses the items when they are active. "
- "This requires more space."))
-
- (set #choosepatch-msg
- (cat "Select patch."))
-
- (set #choosepatch-help
- (cat "\n'Shortbench' prevents icons on the workbench backdrop from"
- " being obscured by the OnGo bar. It does not make sense"
- " to use it if you do not use a backdrop workbench."
- "\n\n'Drag' allows you to drag the OnGo bar vertically."
- "\n\n'AutoHide' will cause the bar to shrink to two pixels high,"
- " and appear when the mouse is near it."
- "\n\nOnly one option may be active."))
-
- (set #choosepos-msg
- (cat "Have the OnGo window appear at the top or bottom of the screen?"))
-
- (set #choosepos-help
- (cat "\nThe OnGo can appear at the bottom of the screen, like Win95,"
- " or you can choose to have it at the top of the screen, like a"
- " toolbar in a word processor."))
-
- (set #bad-wbstart-msg
- (cat "\nOnGo requires WBStart.library, by Stefan Becker. It is not "
- "installed on your machine. You can get this library from "
- "aminet:util/libs."))
-
- (set #bad-datatypes-msg
- (cat "\nOnGo can make use of the DataTypes library to load graphics "
- "in from disk. As you do not have this library installed, "
- "none of the graphics will appear, although OnGo will still "
- "function normally."))
-
- (set #exit-msg
- (cat "You can run OnGo now - just double click on the icon, or reboot"
- " your machine.\n\nEnjoy OnGo!"))
-
- (set #tooldir "SYS:WBStartUp")
- (set #prefdir "SYS:Prefs")
- (set #prefsch 0)
- (set #iconch 0)
- (set #patchch 0)
- (set #lookch 0)
- (set #posch 1)
-
-
- ; ===== Check Kickstart Version
-
-
- (if (< (getversion "LIBS:version.library") (* 37 65536))
- (abort #bad-kick-msg)
- )
-
- (message #hello-msg)
-
- (if (exists "SYS:Utilities/MultiView" (NOREQ))
- (set #Guide "SYS:Utilities/MultiView")
- (set #Guide "SYS:Utilities/AmigaGuide")
- )
-
- (set @default-dest "RAM:")
-
- ; ===== Check for libraries
-
- (if (= 0 (exists "libs:wbstart.library" (noreq)) )
- (abort #bad-wbstart-msg)
- )
-
- (if (= 0 (exists "libs:DataTypes.Library" (noreq)) )
- (message #bad-datatypes-msg)
- )
-
- ; ===== Ask Questions
-
- (if (= 1 @user-level)
- (if (= 0 (askbool (prompt #alltime-msg) (help #alltime-help) ) )
- (set #tooldir "SYS:Tools/Commodities")
- )
- )
-
- (if (= 2 @user-level)
- (set #tooldir
- (askdir (prompt #choosetool-msg)
- (help #choosetool-help)
- (default #tooldir)
- )
- )
- )
-
- (set @default-dest #tooldir)
-
- (if (< 0 @user-level)
- (set #prefsch
- (askchoice (prompt #chooseprefs-msg)
- (help #chooseprefs-help)
- (choices "Magic" "Win95")
- )
- )
- )
-
- (select #prefsch
- (set #prefsfile "OnGo.Config")
- (set #prefsfile "OnGo.Config.Win95")
- )
-
- (if (< 0 @user-level)
- (set #iconch
- (askchoice (prompt #chooseicon-msg)
- (help #chooseicon-help)
- (choices "IconPack" "Flip" "Squish" "Menu")
- )
- )
- )
-
- (select #iconch
- (set #iconfile "Icons/IconPack")
- (set #iconfile "Icons/Flip")
- (set #iconfile "Icons/Squish")
- (set #iconfile "Icons/Menu")
- )
-
- (if (< 1 @user-level)
- (set #lookch
- (askchoice (prompt #chooselook-msg)
- (help #chooselook-help)
- (choices "3DLook" "NewLook" "XLook")
- )
- )
- )
-
- (select #lookch
- (set #look "3DLOOK")
- (set #look "NEWLOOK")
- (set #look "XLOOK")
- )
-
- (if (< 1 @user-level)
- (set #patchch
- (askchoice (prompt #choosepatch-msg)
- (help #choosepatch-help)
- (default 0)
- (choices "None" "Shortbench" "Drag" "AutoHide")
- )
- )
- )
-
- (if (< 1 @user-level)
- (set #posch
- (askchoice (prompt #choosepos-msg)
- (help #choosepos-help)
- (default 1)
- (choices "Top" "Bottom")
- )
- )
- )
-
-
- ; ===== Install main program
-
- (if (exists (tackon #tooldir "OnGo") (noreq))
- (
- (if (exists (tackon #tooldir "OnGo.old") (noreq))
- (delete (tackon #tooldir "OnGo.old") (infos))
- )
- (rename (tackon #tooldir "OnGo")
- (tackon #tooldir "OnGo.old")
- )
- )
- )
-
- (copyfiles
- (prompt "Copying OnGo")
- (help @copyfiles-help)
- (source "OnGo")
- (dest #tooldir)
- (confirm)
- )
-
- (copyfiles
- (prompt "Copying OnGo.info")
- (help @copyfiles-help)
- (source (cat #iconfile ".info") )
- (newname "OnGo.info")
- (dest #tooldir)
- )
-
- (tooltype
- (dest (tackon #tooldir "OnGo"))
- (settooltype "MENUDELAY" "5")
- (settooltype "MENULAP" "75")
- (settooltype "MINWIDTH" "0")
- (settooltype "LOOK" #look)
- (settooltype "ICONKEY" "RCOMMAND \\")
- (settooltype "SCREENKEY3" "LALT F3")
- (settooltype "SCREENTEXT3" "Screen 3")
- (settooltype "SCREENKEY2" "LALT F2")
- (settooltype "SCREENTEXT2" "Screen 2")
- (settooltype "SCREENKEY1" "LALT F1")
- (settooltype "SCREENTEXT1" "Screen 1")
- (settooltype "NUMVSCREENS" "3")
- (settooltype "GADGETTEXT" " OnGo ")
- (settooltype "AUTOHIDE" (if (= #patchch 3) "TRUE" "FALSE"))
- (settooltype "DRAG" (if (= #patchch 2) "TRUE" "FALSE"))
- (settooltype "SHORTBENCH" (if (= #patchch 1) "TRUE" "FALSE"))
- (settooltype "POSITION" (select #posch "TOP" "BOTTOM"))
- (settooltype "PREFSPRG" "SYS:Prefs/OnGo.Prefs")
- (settooltype "TOOLSARC" "ENVARC:OnGo.Config")
- (settooltype "TOOLSFILE" "ENV:OnGo.Config")
- (settooltype "CX_SHOW" "YES")
- (settooltype "CX_PRIORITY" "0")
- (settooltype "CX_HOTKEY" "CTRL LALT o")
- (settooltype "TOOLPRI" "1")
- (settooltype "DONOTWAIT" "")
- )
-
-
- ; ===== Install prefs program
-
- (copyfiles
- (prompt "Copying OnGo-Prefs")
- (help @copyfiles-help)
- (source "OnGo-Prefs")
- (dest #prefdir)
- (confirm)
- )
-
- (copyfiles
- (prompt "Copying OnGo-Prefs.info")
- (help @copyfiles-help)
- (source (cat #iconfile "-Prefs.info") )
- (newname "OnGo-Prefs.info")
- (dest #prefdir)
- )
-
- (tooltype
- (dest (tackon #prefdir "OnGo-Prefs") )
- (setdefaulttool #Guide)
- )
-
- ; ===== Install config files
-
- (if (exists "ENVARC:OnGo.Config" (noreq))
- (
- (if (exists "ENVARC:OnGo.Config.old" (noreq))
- (delete "ENVARC:OnGo.Config.old")
- )
- (rename "ENVARC:OnGo.Config"
- "ENVARC:OnGo.Config.old"
- )
- )
- )
-
- (copyfiles
- (prompt "Copying OnGo.Config")
- (help @copyfiles-help)
- (source #prefsfile)
- (dest "ENVARC:")
- (newname "OnGo.Config")
- (confirm)
- )
-
- (copyfiles
- (prompt "Copying OnGo.Config")
- (help @copyfiles-help)
- (source #prefsfile)
- (dest "ENV:")
- (newname "OnGo.Config")
- (infos)
- )
-
- ; ===== Install icons
-
- (copyfiles
- (prompt "Copying OnGo Icons")
- (help @copyfiles-help)
- (source "OnGoIcons")
- (dest "S:OnGoIcons")
- (all)
- (confirm)
- )
-
- ; ==== Exit
-
- (exit #exit-msg)
-
- ; ==== End of installer script
-
-